<template>
	<div class="pages" :style="{'padding':$store.state.userType==1?'20px':'0px'}">
		<el-form :inline="true" size="small" :model="dataForm" label-width="80px">
			<el-form-item label="操作时间:">
				<el-date-picker v-model="dateArr" @change="dateChange" value-format="yyyy-MM-dd" type="daterange"
					range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
				</el-date-picker>
			</el-form-item>
			<el-form-item label="操作员	:">
				<el-input v-model="dataForm.keyword" placeholder="请输入"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button type="primary" @click="getDataList">搜索</el-button>
			</el-form-item>
		</el-form>
		<el-table :data="dataList" v-loading="dataListLoading" border style="width: 100%" header-align="center">
			<el-table-column type="index" align="center" label="序号" width="60">
			</el-table-column>
			<el-table-column prop="admin_name" align="center" label="操作员">
			</el-table-column>
			<el-table-column prop="content" align="center" label="操作内容">
			</el-table-column>
			<el-table-column prop="ip" align="center" label="操作ip">
			</el-table-column>
			<el-table-column prop="create_time" align="center" label="操作时间">
			</el-table-column>
		</el-table>
		<el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="total"
			layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
			@current-change="pageCurrentChangeHandle">
		</el-pagination>
	</div>
</template>

<script>
	import mixinViewModule from '@/mixins/view-module'
	export default {
		mixins: [mixinViewModule],
		data() {
			return {
				mixinViewModuleOptions: {
					getDataListURL: '/api/adminlog/getlist',
					getDataListIsPage: true,
					deleteIsBatch: true,
					createdIsNeed: true,
				},
				dataForm: {
					keyword: '',
					startTime: '',
					endTime: ''
				},
				dateArr: []
			}
		},
		methods: {
			dateChange(e) {
				if (e) {
					this.dataForm.startTime = e[0]
					this.dataForm.endTime = e[1]
				} else {
					this.dataForm.startTime = ''
					this.dataForm.endTime = ''
				}
			}
		},
		created() {}
	}
</script>

<style>
</style>